<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link href="/static/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="/static/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script><![endif]-->
<title>业主查看</title>
<style type="text/css">
  .left{float:left;}
</style>
</head>
<body>
<div class="cl pd-20" style=" background-color:#5bacb6">
  <img class="avatar size-XL l" src="/static/upload/{$info.avatar}">
  <dl style="margin-left:80px; color:#fff">
    <dt><span class="f-18">真实姓名: {$info.vname}</span><br> <span class="f-12"> 昵称: {$info.nickname}</span></dt>
    <dd class="pt-10 f-12" style="margin-left:0">名下房源: {$count}套</dd>
  </dl>
</div>
<div class="pd-20">
  <table class="table">
    <tbody>
      <tr>
        <th class="text-r" width="80">性别：</th>
        <td>{$info.sex}</td>
      </tr>
      <tr>
        <th class="text-r">看房地址：</th>
        <td>{$info['addr']}</td>
      </tr>
      <tr>
        <th class="text-r">查看手机：</th>
        <td class='tel'>
          <form action="" method="post" class="form form-horizontal" id="form-article-add">
            <ul>
              <li class='left'><input class='ch' name="check" type="checkbox" value="1">&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" class="input-text" name="content" placeholder="查看业主号码请勾选" required style='width:200px'></li>
              <li><button class="btn btn-primary radius" id="submit" type="submit"><i class="Hui-iconfont">&#xe600; 添加跟进</a></li>
            </ul>
          </form>
        </td>
      </tr>
    </tbody>
  </table>
</div>
<div class="mt-20">
    <table class="table table-border table-bordered table-bg table-hover table-sort">
      <thead>
        <tr class="text-c">
          <th width="30">跟进编码</th>
          <th width="150">跟进内容</th>
          <th width="40">跟进人</th>
          <th width='30'>时间</th>
          <th width='20'>操作</th>
        </tr>
      </thead>
      <tbody>
        {foreach name='data' item='v'}
        <tr class="text-c va-m you">
          <td>{$v.sid}</td>
          <td>{$v.content}</td>
          <td>{$v.mname}</td>
          <td>{$v.date}</td>
          <td><a style="text-decoration:none" class="ml-5" onClick="followinfo_del(this,'{$v.fid}')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
        </tr>
        {/foreach}
      </tbody>
    </table>
  </div>
{include file='public/footer'}
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
  <script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript">
  $().ready(function(){
    $('form').validate({
      submitHandler:function(form){
        $(form).ajaxSubmit({
          type:'post',
          url:'{:url('followinfo')}?rid={:input('get.rid')}',
          dataType:'text',
          success:function(res){
            res = eval('('+res+')');
            if(res.msg != 'no'){
              $('.tel').text(res.msg);
              setTimeout(shuaxin,5000);
            }else{
              setTimeout(shuaxin,100);
            }
            function shuaxin(){
              location.href = "{:url('owner_show')}?rid={:input('get.rid')}"
            }
          }
        })
      }
    });
  })

function followinfo_del(obj,id){
  layer.confirm('确定要删除么',function(index){
    $.post('followinfo_del.html','fid='+id,function(res){
        if(res.msg == 1){
          location.reload();
        }
    });
  });
  
}
</script>